﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 画图
{
    /// <summary>
    /// 线段的基本参数
    /// 基本原理:y=kx+b
    /// </summary>
    public class LineBaseParam {
        
        Point _startPoint;
        /// <summary>
        /// 起始点
        /// </summary>
        public Point StartPoint {
            get => this._startPoint;
            set => this._startPoint = value;
        }

        
        Point _endPoint;
        /// <summary>
        /// 结束点
        /// </summary>
        public Point EndPoint {
            get => this._endPoint;
            set => this._endPoint = value;
        }

        
        double _kValue = 0;
        /// <summary>
        /// 起始K值
        /// K值即斜率
        /// </summary>
        protected double KValue {
            get => this._kValue;
            set => this._kValue = value;
        }

        double _bValue = 0;
        /// <summary>
        /// B值，即y轴上的偏移值
        /// </summary>
        protected double BValue {
            get => this._bValue;
            set => this._bValue = value;
        }

        
        int _canvasStartH = 0;
        /// <summary>
        /// 画布起始高度
        /// </summary>
        public int CanvasStartH {
            get => this._canvasStartH;
            set => this._canvasStartH = value;
        }
        
        int _canvasStartW = 0;
        /// <summary>
        /// 画面起始宽度
        /// </summary>
        public int CanvasStartW {
            get => this._canvasStartW;
            set => this._canvasStartW = value;
        }

        
        int _canvasCurrH = 0;
        /// <summary>
        /// 画布当前高度
        /// </summary>
        public int CanvasCurrH {
            get => this._canvasCurrH;
            set => this._canvasCurrH = value;
        }
        
        int _canvasCurrW = 0;
        /// <summary>
        /// 画布当前席度
        /// </summary>
        public int CanvasCurrW {
            get => this._canvasCurrW;
            set => this._canvasCurrW=value;
        }

        
        double _xZoomMultiples = 1;
        /// <summary>
        /// X轴缩放倍数
        /// 用于计算终点坐标
        /// </summary>
        protected double XZoom {
            get => this._xZoomMultiples;
            set => this._xZoomMultiples = value;
        }

        
        double _yZoomMultiples = 1;
        /// <summary>
        /// Y轴缩放倍数
        /// </summary>
        protected double YZoom {
            get => this._yZoomMultiples;
            set => this._yZoomMultiples = value;
        }
    }
}
